home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / PictPort.h < prev    next >
C/C++ Source or Header  |  1992-04-27  |  2KB  |  68 lines

  1. #ifndef PictPort_First
  2. #ifdef __GNUG__
  3. //pragma once
  4. #pragma interface
  5. #endif
  6. #define PictPort_First
  7.  
  8. #include "PrintPort.h"
  9. #include "MemBuf.h"
  10.  
  11. class PictPort: public PrintPort {    
  12. protected:
  13.     class MemBuf *pagebuf;
  14.     Point lastpos, lastdia, lastextent;
  15.     Font *lastfont;
  16.     int lastpsz, laststartangle, lastendangle;
  17.     GrLineCap lastcap;
  18.     Ink *lastink2;
  19.     ObjArray *map;
  20.  
  21.     class Picture *pict;
  22.  
  23.     void PutByte(byte b)
  24.     { pagebuf->sputc(b); }
  25.     void PutCode(int c)
  26.     { PutByte(c); }
  27.     void PutChar(char c)
  28.     { pagebuf->sputc(c); }
  29.     void PutShort(short s);
  30.     void PutInt(int i);
  31.     void PutPoint(byte code, Point p);
  32.     void PutPos(Point pos);
  33.     void PutRect(Rectangle *r);
  34.     void PutSize(int s);
  35.     void PutCap(GrLineCap cap);
  36.     void PutAngle(int s, int e);
  37.     void PutDia(Point e);
  38.     void PutInk();
  39.  
  40. public:
  41.     MetaDef(PictPort);
  42.     PictPort(Picture*);
  43.     ~PictPort();
  44.     
  45.     Picture *GetPicture()
  46.     { return pict; }
  47.     void DevOpenPage(int n);
  48.     void DevClosePage();
  49.     void DevClip(Rectangle);
  50.     void DevStrokeLine(int, Rectangle*, GrLineCap, Point, Point);
  51.     void DevShowChar(Font *fdp, Point delta, byte c, Rectangle*);
  52.     void DevStrokeRect(int, Rectangle*);
  53.     void DevFillRect(Rectangle*);
  54.     void DevStrokeOval(int, Rectangle*);
  55.     void DevFillOval(Rectangle*);
  56.     void DevStrokeRRect(int, Rectangle*, Point);
  57.     void DevFillRRect(Rectangle*, Point);
  58.     void DevStrokeWedge(int, GrLineCap, Rectangle*, int, int);
  59.     void DevFillWedge(Rectangle*, int, int);
  60.     void DevStrokePolygon(Rectangle*, Point*, int, GrPolyType t, int, GrLineCap);
  61.     void DevFillPolygon(Rectangle*, Point*, int, GrPolyType t);
  62.     void DevShowBitmap(Rectangle*, class Bitmap*);
  63.     void DevShowPicture(Rectangle *r, Picture *pict);
  64.     void DevGiveHint(int code, int len, void *vp);
  65. };
  66.  
  67. #endif
  68.